from django.db import models


class Book(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=100, null=False)
    author = models.CharField(max_length=100, null=False)
    price = models.FloatField(default=0)

    def __str__(self):
        return '<Book:({name}, {author}, {price})>'.format(name=self.name, author=self.author, price=self.price)
